// pages/lxwomenxq/lxwomenxq.js
var app = getApp();
Page({

  /**
   * 页面的初始数据
   */
  data: {
    getcampusinfo: app.data.url +'/zhongxue/maoapi/campusinfo',
    src: app.data.url +"/uploads/zhongxue/xuexiaodizhi.png",
    zuobiao:app.data.url +"/uploads/zhongxue/ditus.png",
    xuaxiaos: {
      name: "成都博知堂高新分校", xiaozhang: "张雨芹", phone: "038-5662703", email: "981711455@qq.com",address:"四川省成都市锦江区中纱帽街8号3栋5001室"
    },

  },
   
   //地图详情
   binds:function(e){
     var address = e.currentTarget.dataset.address;
     wx.navigateTo({
       url: '/pages/dituxq/dituxq?address='+address,
     })

   },



  /**
   * 生命周期函数--监听页面加载
   */
  onLoad: function (options) {
    var id = options.id;

    var user = wx.getStorageSync('user');
    var that = this;
    wx.request({
      url: that.data.getcampusinfo,
      data:{token:user.token,id:id},
      method:'post',
      success:function(res){
        var data = res.data;

        if(data.code==200){
          that.setData({ xuaxiaos:data.data});
        }else{
          wx.showToast({
            title: data.msg,
            icon:'none',
            duration: app.data.quanbushijian
          })
        }
      }
    })
  },

  /**
   * 生命周期函数--监听页面初次渲染完成
   */
  onReady: function () {

  },

  /**
   * 生命周期函数--监听页面显示
   */
  onShow: function () {

  },

  /**
   * 生命周期函数--监听页面隐藏
   */
  onHide: function () {

  },

  /**
   * 生命周期函数--监听页面卸载
   */
  onUnload: function () {

  },

  /**
   * 页面相关事件处理函数--监听用户下拉动作
   */
  onPullDownRefresh: function () {

  },

  /**
   * 页面上拉触底事件的处理函数
   */
  onReachBottom: function () {

  },

  /**
   * 用户点击右上角分享
   */
  onShareAppMessage: function () {
    return {
      path: '/pages/indexfirst/indexfirst',
    }
  }
})